﻿using PowerManage.Entity.Dtos.Accounts;
using PowerManage.Entity.Dtos.Permissions;

namespace PowerManage.Service;

public interface IRolePermissionService
{
    /// <summary>
    /// 获取角色权限列表
    /// </summary>
    /// <param name="roleName"></param>
    /// <returns></returns>
    Task<List<AccountPermissionsDto>> GetRolePermissions(string roleName);

    /// <summary>
    /// 获取角色权限列表
    /// </summary>
    /// <param name="roleId"></param>
    /// <returns></returns>
    Task<List<PermissionDto>> GetRolePermissions(long roleId);

    /// <summary>
    /// 更新角色权限列表
    /// </summary>
    /// <param name="roleId"></param>
    /// <param name="permissionIds"></param>
    /// <param name="userId"></param>
    /// <returns></returns>
    Task<bool> UpdateRolePermissions(long roleId, List<long> permissionIds, long userId);
}